<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增里程碑')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-milepost-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">宝宝ID：</label>
                <div class="col-sm-8">
                    <input name="babyId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">里程字典ID：</label>
                <div class="col-sm-8">
                    <input name="itemDataId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">里程类型字典ID：</label>
                <div class="col-sm-8">
                    <input name="typeDataId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图片URL：</label>
                <div class="col-sm-8">
                    <input name="imgUrl" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态0未完成,1完成,2提前完成,3超时完成：</label>
                <div class="col-sm-8">
                    <input name="states" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态0未完成,1完成：</label>
                <div class="col-sm-8">
                    <input name="completeState" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否删除 0：否，1是：</label>
                <div class="col-sm-8">
                    <input name="deleted" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "sso/milepost"
        $("#form-milepost-add").validate({
            focusCleanup: true
        });

        var isClick = true;
        function submitHandler() {
            if ($.validate.form() && isClick) {
                isClick = false;
                $.operate.save(prefix + "/add", $('#form-milepost-add').serialize());
            }
        }
    </script>
</body>
</html>